package com.wxzhou.wangzhuan.service;

import java.util.concurrent.Semaphore;

public class SemaphorePair {
    /**
     * 全局信号量，控制整体并发数
     */
    final Semaphore globalSemaphore;
    /**
     * 单源信号量，控制单个解析源的并发数
     */
    final Semaphore sourceSemaphore;

    SemaphorePair(Semaphore globalSemaphore, Semaphore sourceSemaphore) {
        this.globalSemaphore = globalSemaphore;
        this.sourceSemaphore = sourceSemaphore;
    }

}
